const crumbsName = "curmbs";

export const getCrumbs = () => {
  var curmbsStr = sessionStorage.getItem(crumbsName);
  return curmbsStr ? JSON.parse(curmbsStr) : curmbsStr;
};

export const setCrumbs = (crumbs) => {
  sessionStorage.setItem(crumbsName, JSON.stringify(crumbs));
};

export const removeCrumbs = () => {
  sessionStorage.removeItem(crumbsName);
};

const prePathName = "prePath";

export const getPrePath = () => {
  return sessionStorage.getItem(prePathName);
};

export const setPrePath = (prePath) => {
  return sessionStorage.setItem(prePathName, prePath);
};

export const removePrePath = () => {
  return sessionStorage.removeItem(prePathName);
};
